from OpenGL.GLU import *
class camera:
    def __init__(self):
        self.position = [0,0,0]
        self.view = [0.0,0.0,0.0]
        self.lookup = [0.0,0.0,0.0]
        self.far = 200
        self.near = 1.0
        self.perspective = 40.0
        self.events = []
        self.selected = False
        self.allocateEvents()
    def registerEvent(self,definition):
        self.events.append(definition)
    def allocateEvents(self):
        """ 
        Provides an interface to register events locally based
        on a mesh
        """
    def render(self):
        gluLookAt(self.position[0], self.position[1], self.position[2],
                  self.view[0],     self.view[1],     self.view[2],
                  self.lookup[0],   self.lookup[1],   self.lookup[2])
    
    def setPosition(self,coords):
        self.position = coords